#ifndef _BOARD_CONFIG_H
#define _BOARD_CONFIG_H

/*
Configuration	stm8_lock
STM8CubeMX 	1.5.0
Date	10/28/2024
MCU	STM8S003F3Px



PERIPHERALS	MODES	FUNCTIONS	PINS
RCC	Crystal/Ceramic Resonator	RCC_OSCIN	PA1
RCC	Crystal/Ceramic Resonator	RCC_OSCOUT	PA2
SYS	SWIM Input and Output	SYS_SWIM	PD1
TIM2	Output CH2	TIM2_CH2	PD3
TIM2	Output CH3	TIM2_CH3	PD2
UART1	Asynchronous	UART1_RX	PD6
UART1	Asynchronous	UART1_TX	PD5



Pin Nb	PINs	FUNCTIONs	LABELs
1	PD4	GPIO_Output	PIN_PD4_485_EN
2	PD5	UART1_TX	UART1_TX_485
3	PD6	UART1_RX	UART1_RX_485
5	PA1	RCC_OSCIN	
6	PA2	RCC_OSCOUT	
11	PB5	GPIO_Input	ADDR_ID_3
12	PB4	GPIO_Input	ADDR_ID_2
13	PC3	GPIO_Input	ADDR_ID_1
14	PC4	GPIO_Input	DET_K
15	PC5	GPIO_Input	DET_S
16	PC6	GPIO_Input	DET_O
17	PC7	GPIO_Output	M_SLEEP
18	PD1	SYS_SWIM	
19	PD2	TIM2_CH3	M_IN2
20	PD3	TIM2_CH2	M_IN1

  */
#include "stm8s.h"

#define MOTOR_IN_1_PORT GPIOD
#define MOTOR_IN_1_PIN  GPIO_PIN_3

#define MOTOR_IN_2_PORT GPIOD
#define MOTOR_IN_2_PIN  GPIO_PIN_2

#define MOTOR_SLEEP_PORT GPIOC
#define MOTOR_SLEEP_PIN GPIO_PIN_7


#define RS485_EN_PORT GPIOD
#define RS485_EN_PIN  GPIO_PIN_4


#define LOCK_DET_O_PORT GPIOC
#define LOCK_DET_O_PIN GPIO_PIN_7

#define LOCK_DET_S_PORT GPIOC
#define LOCK_DET_S_PIN GPIO_PIN_6

#define LOCK_DET_K_PORT GPIOC
#define LOCK_DET_K_PIN GPIO_PIN_5


#define LOCK_ID_1_PORT GPIOC
#define LOCK_ID_1_PIN GPIO_PIN_3

#define LOCK_ID_2_PORT GPIOB
#define LOCK_ID_2_PIN GPIO_PIN_4

#define LOCK_ID_3_PORT GPIOB
#define LOCK_ID_3_PIN GPIO_PIN_5

#endif /* _BOARD_CONFIG_H */